#ifndef F_TestSSISensorUniC_h
#define F_TestSSISensorUniC_h

// ***********************************************************************

// class EDROOMTopContext

// ***********************************************************************



class EDROOMTopContext {

protected:

enum EDROOMTestSSISensorUniSignal { EDROOMSignalTimeout, EDROOMSignalDestroy, SToListening, SToStandBy, SNextSensorSsiDataFrame, SDataFrame };


	friend class TestSSISensorUni;

	TestSSISensorUni &EDROOMcomponent;

	CEDROOMMessage * &Msg;

	CEDROOMMessage * &MsgBack;

	//Ports

	CEDROOMInterface & SsiCtrl;
	CEDROOMInterface & StoreAndNextFrame;

	enum edroomStateId{I, Listening};

	enum IdTrans{Init, StoreFrame,  EDROOMMEMORIA };

	//Constantes



	//Variables

	TEDROOMInt32 &VMessageReceived;


	//Pool



	// CONSTRUCTORES

	EDROOMTopContext (TestSSISensorUni &act, TEDROOMInt32 & EDROOMpVarVMessageReceived );

	EDROOMTopContext ( EDROOMTopContext &contex );

public:

	bool EDROOMSearchContextTrans(TEDROOMTransId &edroomCurrentTrans);

	void EDROOMNuevoMens () { EDROOMcomponent.EDROOMNewMsg(); }

	// Funciones Definidas por el usuario

	void	FCheckFiles();

	void	FInit();

	void	FListening();

	void	FStoreFrame();

};

// ***********************************************************************

// class EDROOMTopState

// ***********************************************************************



class EDROOMTopState : public EDROOMTopContext {

protected:



	EDROOMTopContext::edroomStateId edroomCurrentState;

	EDROOMTopContext::edroomStateId edroomNextState;

	//Variables

	TEDROOMInt32 VMessageReceived;


	//Pools



public:

	// CONSTRUCTOR

	EDROOMTopState (TestSSISensorUni &act );


	// EDROOMBehaviour**********************************************

	void EDROOMBehaviour();

	// Inicio**********************************************

	void EDROOMInicio();

	// ***********************************************************************

	// SubEstado Inicial 

	// ***********************************************************************



	TEDROOMTransId EDROOMIllegada();

	// ***********************************************************************

	// SubEstado Hoja Listening

	// ***********************************************************************



	TEDROOMTransId EDROOMListeningllegada();

};


#endif
